<?php 
$pageCss = array('category');
$pageJs = array();
$title = empty($q) ? '' : $q;
$this->load->view('header',array('modules'=>$modules,'pageTitle'=>$title, 'pageCss'=>$pageCss));?>
<div class="container">
	<div class="main">
          	<div class="content">
            	<div class="content-wrapper">
                	<h1 class="lastest"><?php echo $title;?></h1>
                    <ul>
                    	<?php if (!empty($result['result'])): foreach ($result['result'] as $article):?>
	                    <li>
	                    	<div class="left-col">
		                    	<a class="img" target="_blank" href="<?php echo site_url('p/'.$article['id']);?>">
		                    		<img class="wp-post-image" title="" alt="" src="<?php $imgUrl = isset($article['logo']) ? getThumbFile($article['logo']) :''; echo site_url().$imgUrl;?>">
		                    	</a>
	                    	</div>
	                    	<div class="right-col">
	                    	<p class="name">
	                    		<a target="_blank" href="<?php echo site_url('p/'.$article['id'])?>"><?php echo $article['title'];?></a>
	                    	</p>
	                    	<p class="ugc">
	                    		<?php $num = mb_strlen($article['summary'], 'utf-8');echo $num>60 ? mb_substr($article['summary'], 0, 60, 'utf-8') . '...' : $article['summary']; ?>
	                    	</p>
	                    	</div>
	                    	<!-- 
		                    <div class="share">
		                    	<em class="time"><?php echo date('m-d', $article['created_at']);?></em>
		                    	<a class="share-btn" href="javascript:void(0)">
				                	<img src="<?php echo base_url()?>images/zhuanfa.png">
				                </a>
				                <span>
				                	<i class="share-heart"><img src="<?php echo base_url()?>/images/good.png"></i>
				                	<a href="#">17</a>
				                </span>
			                </div>
			                 -->
	                    </li>
                    	<?php endforeach; endif;?>
                    </ul>
                    <div class="fenye">
		                <?php if (isset($result['pager'])):?>
		                <p class="page">
		                <?php echo $result['pager']->create_links();?>
		           		<?php endif;?>
	                </div>
                </div>
          </div>
            <div class="aside">
            	<div class="related">
                	<h3>推荐文章</h3>
                	<div class="related-list">
                	<?php if (isset($recommends)): foreach ($recommends as $same):?>
                    	<div class="related-list-cf">
                        <a href="<?php echo site_url('p/'.$same['id'])?>"><?php echo $same['title'];?></a>
                        </div>
                    <?php endforeach; endif;?>
                    </div>
                </div>
                <div class="aside-social">
            		<p>微信公众平台：ieelab 或扫下方二维码：</p>
                     <div class="qrcode"><img src="/images/qrcode.jpg" alt="Qrcode"></div>
            	</div>
            </div>
       </div>
       <div class="main-right">
          <a href="#">
            <img width="280" height="250" alt="" src="images/image003.jpg" /> 
           </a>
           <div class="hot-article">
           	<h3 class="t-h2">
            <em>热门文章</em>   
            </h3>
            <ul>
            <?php if (isset($hot)): foreach ($hot as $item):?>
            <li class="view-list">
            	<h4><a target="_blank" href="<?php echo site_url('p/'.$item['id']);?>"><?php echo $item['title'];?></a></h4>
            </li>
             <?php endforeach; endif;?>
             </ul>
           </div>           
    </div>
    </div>
</div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
<?php $this->load->view('footer', array('pageJs'=>$pageJs));?>